# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BigtableAdmin.V2.Model.AutoscalingTargets do
  @moduledoc """
  The Autoscaling targets for a Cluster. These determine the recommended nodes.

  ## Attributes

  *   `cpuUtilizationPercent` (*type:* `integer()`, *default:* `nil`) - The cpu utilization that the Autoscaler should be trying to achieve. This number is on a scale from 0 (no utilization) to 100 (total utilization), and is limited between 10 and 80, otherwise it will return INVALID_ARGUMENT error.
  *   `storageUtilizationGibPerNode` (*type:* `integer()`, *default:* `nil`) - The storage utilization that the Autoscaler should be trying to achieve. This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster, otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, it will be treated as if it were set to the default value: 2560 for SSD, 8192 for HDD.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :cpuUtilizationPercent => integer() | nil,
          :storageUtilizationGibPerNode => integer() | nil
        }

  field(:cpuUtilizationPercent)
  field(:storageUtilizationGibPerNode)
end

defimpl Poison.Decoder, for: GoogleApi.BigtableAdmin.V2.Model.AutoscalingTargets do
  def decode(value, options) do
    GoogleApi.BigtableAdmin.V2.Model.AutoscalingTargets.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BigtableAdmin.V2.Model.AutoscalingTargets do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
